package com.itcast.dao;

import com.github.pagehelper.Page;
import com.itcast.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface UserDao {
    @Select("select * from t_user where username = #{username}")
    User findByUserame(@Param("username") String username);

    Page<User> findPage(@Param("queryBean") String queryBean);

    void add(User user);
    @Select("select * from t_user where id = #{id}")
    User findById(@Param("id") int id);

    void edit(User user);
    @Delete("delete from t_user where id = #{id}")
    void delUser(@Param("id") int id);

}
